window.addEventListener('load',function(){
    var s1 = document.querySelectorAll('.dh-con li');
    var lis1 = document.querySelectorAll('.dh-con-1');
    var daohang = document.querySelector('.dh-h');
    var dh = document.querySelector('.dh');
    // var dhh = document.querySelector('.dh-h');
    var dhf = document.querySelector('.dh-f');
     for (var i = 0; i < s1.length; i++) {
       s1[i].index = i;
       s1[i].onmouseover = function(e) {
           for (var n = 0; n < lis1.length; n++) {
               lis1[n].style.display = 'none';
               console.log(lis1[n]);
           }
           lis1[this.index].style.display = 'block';
           console.log(lis1[this.index]);
           e.stopPropagation();
       }
      
   }
   daohang.onmouseenter = function(){
       console.log(this);
         dhf.style.height= '473px';
        //  e.stopPropagation();
   }
 daohang.onmouseleave= function(){
        for (var n = 0; n < lis1.length; n++) {
            lis1[n].style.display = 'none';
            console.log(lis1[n]);
            // e.stopPropagation();
        }
        dhf.style.height= '0px';
       }
//....................................................................

var xltm = document.querySelector('.xl-tm');
var xltm1 = document.querySelector('.xl-tm1');
var xltm2 = document.querySelector('.xl-tm2');
var xltm3 = document.querySelector('.xl-tm3');
var xltm4 = document.querySelector('.xl-tm4');
var xltm5 = document.querySelector('.xl-tm5');
var xltm6 = document.querySelector('.xl-tm6');
var xlli = document.querySelector('.xl-lis-1');
var xlli2 = document.querySelector('.xl-lis-2');
var xlli3 = document.querySelector('.xl-lis-3');
var xlli4 = document.querySelector('.xl-lis-4');
var xlli51 = document.querySelector('.xl5-1');
var xlli5 = document.querySelector('.xl-lis-5');
var xlli61 = document.querySelector('.xl6-1');
var xlli6 = document.querySelector('.xl-lis-6');
var xlli71 = document.querySelector('.xl7-1');
var xlli7 = document.querySelector('.xl-lis-7');
var keywords = document.querySelector('.search-con');
var inp = document.querySelector('#inp');
    xltm.onmouseenter = function(){
        xlli.style.display = 'block';
    }
    xltm.onmouseleave = function(){
        xlli.style.display = 'none';
    }
    xltm1.onmouseenter = function(){
        xlli2.style.display = 'block';
    }
    xltm1.onmouseleave = function(){
        xlli2.style.display = 'none';
    }
    xltm2.onmouseenter = function(){
        xlli3.style.display = 'block';
    }
    xltm2.onmouseleave = function(){
        xlli3.style.display = 'none';
    }
    xltm3.onmouseenter = function(){
        xlli4.style.display = 'block';
    }
    xltm3.onmouseleave = function(){
        xlli4.style.display = 'none';
    }
    xltm4.onmouseenter = function(){
        xlli5.style.display = 'block';
        xlli51.style.display = 'block';
    }
    xltm4.onmouseleave = function(){
        xlli5.style.display = 'none';
        xlli51.style.display = 'none';
    }
    xltm5.onmouseenter = function(){
        xlli6.style.display = 'block';
        xlli61.style.display = 'block';
    }
    xltm5.onmouseleave = function(){
        xlli6.style.display = 'none';
        xlli61.style.display = 'none';
    }
    xltm6.onmouseenter = function(){
        xlli7.style.display = 'block';
        xlli71.style.display = 'block';
    }
    xltm6.onmouseleave = function(){
        xlli7.style.display = 'none';
        xlli71.style.display = 'none';
    }
    inp.onclick = function(e){
        keywords.style.display = 'block';
      e.stopPropagation();
      }
      document.onclick = function(){
        keywords.style.display = 'none';
      };
})


